<?php # $this->load->view('layouts/_flash'); ?>
<?if(isset($system_message))echo $system_message;?>
<?
	if(!empty($all_users)){
		foreach($all_users as $users){
		$usernameAt = set_value('username') 	 == FALSE ? $users->username   :  set_value('username');
		$userTypeAt = set_select('userType') 	 == FALSE ? $users->userType   :  set_select('userType');
		$userStatAt = set_select('userStatus') == FALSE ? $users->userStatus :  set_select('userStatus');
		$hidden = array('id'=>$users->id);
		}
		
	}
?>
<div class="ui-corner-all contentContainer" style="background-color: #fff;">

<div style="position: relative;">

<div style="float: left;">
<div class="ui-corner-top side_menu" style="width: 700px;">Update user</div>
<div style="border:1px  solid #286bcc;">
<div>&nbsp;</div>
<div>
<?echo validation_errors();?>

<?php 
echo form_open('users/update');
?>

<fieldset>
    <div style="position: relative;">
        <div style="float: left; width: 100px; line-height: 3;"><span class="span"> Username </span></div>
        <div style="float: left; line-height: 3;">
        <span class="span">
            <?php
            $opt = 'class="ui-corner-all" style="border:#ccc 2px solid;" maxlength="255"';
            echo form_input('username', $usernameAt, $opt);
            ?>
        </span>
        </div>
        <div class="clearfloat"></div>
        <div style="float: left; width: 100px; line-height: 3;"><span class="span"> Type </span></div>
        <div style="float: left; line-height: 3;">
        <span class="span">
            <?php
            echo form_dropdown('userType', array('user' => 'Standard User', 'president' => 'President User', 'admin' => 'Admin User', 'dean' => 'Dean User', 'cashier' => 'Cashier User', 'registrar' => 'Registrar User'), $userTypeAt, $opt);
            ?>
        </span>
        </div>
        <div class="clearfloat"></div>
        <div style="float: left; width: 100px; line-height: 3;"><span class="span"> Status </span></div>
        <div style="float: left; line-height: 3;">
        <span class="span">
            <?php
            echo form_dropdown('userStatus', array('active' => 'Can log in', 'inactive' => 'Cannot log in'), $userStatAt, $opt);
            ?>
        </span>
        </div>
        <div class="clearfloat"></div>
        <div style="float: left; width: 100px; line-height: 3;"><span class="span"> &nbsp; </span></div>
        <div style="float: left; line-height: 3;">
        <span class="span">
            <?php
            $opt4 = 'class="ui-corner-all submit"';
            echo form_hidden($hidden);
			echo form_submit('', 'update', $opt4);
			
            ?>
        </span>
        </div>
        <div class="clearfloat"></div>
    </div>
</fieldset>

<?php
echo form_close();
?>

</div>
<div class="clearfloat"></div>
</div>
<div>&nbsp;</div>
</div>
</div>
<div class="clearfloat"></div>
</div>

</div>